<?php
declare (strict_types=1);

namespace app\backend\controller\v3;


use app\common\model\Error as ErrorModel;

class ErrorDetail extends BaseController
{
    /**
     * 显示资源列表
     *
     * @return \think\Response
     */
    public function index()
    {
        return sucessMsg(200, '获取成功', [
            'xiangqing' => $this->detail(),   //获取做错的题
        ]);
    }

    /**
     * 获取不会做的题
     *
     * @return \think\Response
     */
    public function detail()
    {
        $id = input('api_member_id/d');
        $model = new ErrorModel();
        $data = $model
            ->where(['status' => 1, 'api_member_id' => $id])
            ->field('*')
            ->select();
        return $data;
    }
}
